import java.io.Serializable;
import java.text.DecimalFormat;

public class ExamRecord implements Serializable {
    public int examTimes = 0;
    public int answeredQuestionNumber = 0;
    public double accuracy = 0.0;
    public double averageScore = 0.0;

    @Override
    public String toString() {
        DecimalFormat df = new DecimalFormat("#.00");
        return "考试记录{" +
                "考试次数=" + examTimes +
                ", 正确率=" + df.format(accuracy*100)+"%"+
                ", 答题数=" + answeredQuestionNumber +
                ", 考试平均分=" + df.format(averageScore) +
                '}';
    }
}
